package com.example.administrator.exkotlin.jetpack.room.entity

import androidx.room.Entity
import androidx.room.PrimaryKey

/**
 * Author by lp,on 2020/11/19/019,16:51.
 */
@Entity
data class Book(var bookName:String,var  bookPrice:Int,var author :String) {
    //自增主键
    @PrimaryKey(autoGenerate = true)
    var id:Long=0

    override fun toString(): String {
        return "Book(bookName='$bookName', bookPrice=$bookPrice, author='$author', id=$id)"
    }

}